package store

import "errors"

var (
	ErrorNotFound             = errors.New("not found")
	ErrorDuplicated           = errors.New("duplicated")
	ErrorEngineOperationError = errors.New("engine operation error")
)

type Note struct {
	Id       uint64 `json:"id"`
	Nickname string `json:"nick"`
	Email    string `json:"email"`
	Message  string `json:"note"`
	Status   uint8  `json:"status"`
	Time     uint32 `json:"time"`
}

type Store interface {
	Create(*Note) error
	Get(uint64) (Note, error)
	Update(*Note) error
	Delete(uint64) error
	ListAll() ([]Note, error)
}
